/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/{{apis}}/dto/{{apiDtos@DEFAULT}}.java.hbs
 */
package cn.ibizlab.api.dto;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 角色授权资源[SysGrantedAuthorityDTO]
 *
 * @author generator
 */
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel("角色授权资源DTO")
public class SysGrantedAuthorityDTO extends DTOBase implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @JsonProperty("id")
    @JSONField(name = "id")
    @ApiModelProperty(value = "标识", position = 0)
    private String id;

    /**
     * 创建人
     */
    @JsonProperty("creator")
    @JSONField(name = "creator")
    @ApiModelProperty(value = "创建人", position = 1)
    private String creator;

    /**
     * 创建时间
     */
    @JsonProperty("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "create_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", position = 2)
    private Date createTime;

    /**
     * 最后更新人
     */
    @JsonProperty("updater")
    @JSONField(name = "updater")
    @ApiModelProperty(value = "最后更新人", position = 3)
    private String updater;

    /**
     * 最后更新时间
     */
    @JsonProperty("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @JSONField(name = "update_time" , format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后更新时间", position = 4)
    private Date updateTime;

    /**
     * DC
     */
    @JsonProperty("dc")
    @JSONField(name = "dc")
    @ApiModelProperty(value = "DC", position = 5)
    private String dc;

    /**
     * 角色标识
     */
    @JsonProperty("role_id")
    @JSONField(name = "role_id")
    @ApiModelProperty(value = "角色标识", position = 6)
    private String roleId;

    /**
     * 资源符
     */
    @JsonProperty("authority")
    @JSONField(name = "authority")
    @ApiModelProperty(value = "资源符", position = 7)
    private String authority;

    /**
     * 显示名
     */
    @JsonProperty("display_name")
    @JSONField(name = "display_name")
    @ApiModelProperty(value = "显示名", position = 8)
    private String displayName;

    /**
     * 类型
     */
    @JsonProperty("permission_type")
    @JSONField(name = "permission_type")
    @ApiModelProperty(value = "类型", position = 9)
    private String permissionType;


    /**
     * 设置 [DC]
     */
    public SysGrantedAuthorityDTO setDc(String dc) {
        this.dc = dc;
        this.modify("dc", dc);
        return this;
    }

    /**
     * 设置 [角色标识]
     */
    public SysGrantedAuthorityDTO setRoleId(String roleId) {
        this.roleId = roleId;
        this.modify("role_id", roleId);
        return this;
    }

    /**
     * 设置 [资源符]
     */
    public SysGrantedAuthorityDTO setAuthority(String authority) {
        this.authority = authority;
        this.modify("authority", authority);
        return this;
    }

    /**
     * 设置 [显示名]
     */
    public SysGrantedAuthorityDTO setDisplayName(String displayName) {
        this.displayName = displayName;
        this.modify("display_name", displayName);
        return this;
    }

    /**
     * 设置 [类型]
     */
    public SysGrantedAuthorityDTO setPermissionType(String permissionType) {
        this.permissionType = permissionType;
        this.modify("permission_type", permissionType);
        return this;
    }


}
